/****************************************************************
 *  FileName: ex2.c
 *  Author: Harsh and Maulik
 *  Description: This example makes couple of graph 
 *		 as shown in paper Graph Based Aldgorithm for 
 *		 Boolean Function Manipulation. On page 15.
 *  Last Updated: 5th Sept. 2011
 ***************************************************************/	




#include "BDD.h"

void ex2(struct graph *g1,struct graph *g2)
{
	vertex *temp1, *temp2;
	char variable[1000];
	init(g1);
	init(g2);

	strcpy(variable,"a");
	g1->root = (vertex *)insertVertex(3,1,variable,1);
        strcpy(variable,"c");
	temp1 = g1->root->low = (vertex *)insertVertex(1,4,variable,2);
        strcpy(variable,"b");
	g1->root->high = (vertex *)insertVertex(3,3,variable,3);
	g1->root->high->low = temp1;
        strcpy(variable,"d");
	g1->root->high->high = (vertex *)insertVertex(0,4,variable,4);

        strcpy(variable,"e");
	g2->root = (vertex *)insertVertex(3,1,variable,1);
        strcpy(variable,"g");
	temp2 = g2->root->low = (vertex *)insertVertex(0,4,variable,2);
        strcpy(variable,"f");
	g2->root->high = (vertex *)insertVertex(3,2,variable,3);
	g2->root->high->low = temp2;
        strcpy(variable,"h");
       	g2->root->high->high = (vertex *)insertVertex(1,4,variable,4);


}	
